package com.pur.zsms.supplier.dao;

import java.math.BigDecimal;
import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.ordercustommanage.po.OrderSupplierMaterPo;
import com.pur.zsms.ordercustommanage.po.OrderSupplierMaterRealPo;
import com.pur.zsms.ordercustommanage.po.OrderSupplierPo;
import com.pur.zsms.ordercustommanage.vo.OrderSupplierVo;
import com.pur.zsms.supplier.po.SupplierPo;

public interface SupplierOrderDao {
	public PaginationSupport listSupplierOrder(PageController pageController, OrderSupplierVo supplierOrderVo) throws GenericException;

	public PaginationSupport findSupCheck(PageController pageController, OrderSupplierVo supplierOrderVo) throws GenericException;

	public PaginationSupport listCustOrder(PageController pageController, OrderSupplierVo supplierOrderVo) throws GenericException;

	public PaginationSupport listCustOrderAllForpurchase(PageController pageController, OrderSupplierVo supplierOrderVo) throws GenericException;

	public OrderSupplierPo getOrderSup(String ordId, String ordCustId, String ordSupId) throws GenericException;

	public List<SupplierPo> getOrderSupList(String ordId) throws GenericException;

	public List<Object[]> getSupUpdateOrderMater(String ordId, String supId, String materId) throws GenericException;

	public List<SupplierPo> getOrderSupList(String ordId, String materId) throws GenericException;

	public List<OrderSupplierPo> isExistOrderSup(String ordCustId, String ordSupId, String orderDay, int materId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupList(String ordId, String ordCustId, String ordSupId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupListByOrdIdAndSupId(long ordId, long ordSupId) throws GenericException;

	public List getOrderSupMaterReal(String ordId, String ordCustId, String ordSupId) throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealForInStore(String ordId, String ordCustId, String ordSupId) throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealForMaterCost(String orderDate, int ordSupId, int materId) throws GenericException;

	public List getOrderSupMaterNeed(String ordId, String ordCustId, String ordSupId) throws GenericException;

	public OrderSupplierMaterPo getOrderSupMaterByOrdIdMaterId(String ordId, String ordMaterId) throws GenericException;

	public List<OrderSupplierMaterPo> getOrderSupMaterByOrdIdSupId(String ordId, String ordSupId, String ordMaterId) throws GenericException;

	public OrderSupplierMaterRealPo getOrderSupMaterRealByOrdIdMaterId(int ordId, int ordMaterId) throws GenericException;

	public OrderSupplierMaterRealPo getOrderSupMaterRealByOrdIdMaterIdSupId(int ordId, int ordMaterId, int ordSupId) throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealListByOrdIdMaterId(int ordId, int ordMaterId, int ordSupId, int ordCustId)
			throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealListByOrdIdMaterId(int ordId, int ordMaterId) throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealListBySupIdOrdDateMaterIdAndCustId(int ordSupId, String ordDate, int materId,
			String custId) throws GenericException;

	public List<OrderSupplierMaterRealPo> getOrderSupMaterRealListBySupIdOrdDateMaterIdAndCustIdForNotPrt(int ordSupId, String ordDate, int materId,
			String custId) throws GenericException;

	public OrderSupplierPo getOrderSupByOrdIdSupId(String ordId, String ordSupId) throws GenericException;

	public void updateOrderSupplierPo(OrderSupplierPo orderSupplierPo) throws GenericException;

	public void deleteOrderSupperMater(String ordId, String ordMaterId, String ordSupId) throws GenericException;

	/** 计算真实总价格 */
	public BigDecimal computeValueReal(int ordId, int supId) throws GenericException;

	public BigDecimal computeValueRealCost(int ordId, int supId) throws GenericException;

	/** 计算估算总价格 */
	public BigDecimal computeValue(int ordId, int supId) throws GenericException;

	public void updateOrderSupplierMaterReal(OrderSupplierMaterRealPo po) throws GenericException;

	public List<Object[]> getSupNoteMessageContent(String ordId, int supId);

}
